//
//  UIView+UIViewNightMode.m
//  NightModeDemo
//
//  Created by dllo on 15/12/11.
//  Copyright © 2015年 ZKJ. All rights reserved.
//

#import "UIView+UIViewNightMode.h"

@implementation UIView (UIViewNightMode)

- (void)nightMode {
    NSUserDefaults *user = [NSUserDefaults standardUserDefaults];
    NSString *mode = [user objectForKey:@"NightMode"];

    if ([mode isEqualToString:@"Night"]) {
        self.backgroundColor = [UIColor grayColor];
    } else {
        self.backgroundColor = [UIColor whiteColor];
    }
}

@end
